import React, { PureComponent } from 'react';
import cns from 'classnames';

import S from './index.m.less';

export default class BottomZengxin extends PureComponent {
    static defaultProps = {
        fromNavigator: false,
        bottom: '',
        holderHeight: '',
    };

    render() {
        const { fromNavigator, bottom, holderHeight } = this.props;

        if (WPT.os.dyXcx || WPT.os.bdXcx) {
            return null;
        }

        let style = {};
        if (bottom) {
            style = {
                bottom,
            };
        }

        return (
            <div className={cns(fromNavigator || bottom ? S.abs : S.keepBottom)}>
                <div className={S.holder} style={holderHeight ? { height: holderHeight } : {}} />
                <div className={S.content} style={style}>
                    <Link className={S.link} href="/webApp/conduciveOne?r=wptBottomSupport" />
                </div>
            </div>
        );
    }
}
